package de.tum.in.eist.poll.client.Model;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Extension;

@SuppressWarnings("serial")
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
public class Feedback implements Serializable {
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    @Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
    private String encodedKey;
	
	@Persistent
	private int rating;
	@Persistent
	private String positiveFeedback;
	@Persistent
	private String negativeFeedback;
	@Persistent
	private String lectureKey;
	
	@SuppressWarnings("unused")
	private Feedback() {
		
	}
	
	public Feedback(int rating, String posFb, String negFb, String key) {
		this.rating = rating;
		this.positiveFeedback = posFb;
		this.negativeFeedback = negFb;
		this.lectureKey = key;
	}
	
	public String getEncodedKey() {
		return encodedKey;
	}

	public int getRating() {
		return rating;
	}
	
	public String getPositiveFeedback() {
		return positiveFeedback;
	}
	
	public String getNegativeFeedback() {
		return negativeFeedback;
	}
	
	public String getLectureKey() {
		return lectureKey;
	}
}
